package Ctr;

import Model.Student;
import Model.Teacher;

public class LoginCtr implements LoginCtrIF {

    private TeacherCtr teacherCtr;
    private StudentCtr studentCtr;

    public LoginCtr() {
        teacherCtr = new TeacherCtr();
        studentCtr = new StudentCtr();
    }

    /**
     * Teacher login
     * @param userName
     * @param password
     * @return teacher
     */
    @Override
    public Teacher teacherLogin(String userName, String password) {
        return teacherCtr.teacherLogin(userName, password);
    }

    /**
     * Student login
     * @param userName
     * @param password
     * @return student
     */
    @Override
    public Student studentLogin(String userName, String password) {
        return studentCtr.studentLogin(userName, password);
    }
}
